<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../utils/flexible.js"></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="../css/sitenav.css">
</head>
<body>
    
    <div class="header">
        <a href="../index.html"> <
            </a>
                <span>商品导航</span>
                <img src="../assets/imgs/header_app.png" alt="">
    </div>

    <div class="container">
        <ul>
            <li>
                <img src="../assets/imgs/ic_bcj.png" alt="">
               <span>123456</span>
            </li>
        </ul>
    </div>


    <div class="footer">
        <div class="more">
            <a>更多优惠信息>></a>
        </div>
        <div class="chart">
            <span>品牌排行</span>
        </div>
        <ul>
            <li>登入</li>
            <li>注册</li>
            <li><a href="#top">返回顶部</a></li>
        </ul>
        <p>手机APP下载 慢慢买手机版 -- 掌上比价平台</p>
        <p>m.manmanbuy.com</p>
    </div>



    <script>
        $.ajax({
            url:"http://chst.vip:1234/api/getsitenav"
        }).then(res=>{
            creatUl(res.result);
        })
        function creatUl(data) {
            console.log(data);
            let html = "";
            data.forEach(item => {
                html +=`
                <li>
                    <img src="${item.navImg}" alt="">
                    <span> ${item.navTitle} </span>
                </li>
                `;
            });
            $(".container ul").html(html);
        }
    </script>
</body>
</html>